Carbon


GetCollectionItemHdl

Header: Collections.h Carbon status: Supported

Obtains a copy of the variable-length data associated with a collection item given the item’s collection tag and collection ID.

OSErr GetCollectionItemHdl (
    Collection aCollection, 
    CollectionTag tag, 
    SInt32 id, 
    Handle itemData
);
aCollection

A reference to the collection object containing the item whose data you want to retrieve. The behavior of this function is undefined if you do not provide a reference to a valid collection object.

tag

The collection tag associated with the item whose data you want to retrieve.

id

The collection ID associated with the item whose data you want to retrieve.

itemData

A handle to a block of memory to contain the item’s data. On return, this memory contains a copy of the data associated with the specified item. You must provide a valid Macintosh Memory Manager handle for this function to copy the data into.You may specify the constant dontWantData for this parameter if you do not want a copy of the item’s data.

function result

A result code.

DISCUSSION

You specify a collection object using the aCollection parameter and you specify an item in that collection using the tag and id parameters.

To retrieve the data associated with a collection item into a block of memory referenced by a pointer (rather than a handle), use the GetCollectionItem function.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)